{{!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements.  See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership.  The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License.  You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
}}
    <div id="dag_viewer"></div>

    <div id="dag_viewer_legend">
      <ul>
        <li><span id="job"></span>Unfinished Job</li>
        <li><span id="allmap"></span>All Maps on Cluster</li>
        <li><span id="allshuffle"></span>All Shuffles on Cluster</li>
        <li><span id="allreduce"></span>All Reduces on Cluster</li>
        <li><span id="jobdone"></span>Finished Job</li>
        <li><span id="map"></span>Maps for this App</li>
        <li><span id="shuffle"></span>Shuffles for this App</li>
        <li><span id="reduce"></span>Reduces for this App</li>
      </ul>
    </div>

    <table class="table table-bordered table-striped" id="innerTable">
      <thead>
      <tr>
        {{#view view.sortView contentBinding="controller.content.jobs"}}
          {{#if view.parentView.hasManyJobs}}{{view view.parentView.nameSort}}{{/if}}
          {{view view.parentView.idSort}}
          {{view view.parentView.statusSort}}
          {{view view.parentView.mapsSort}}
          {{view view.parentView.reducesSort}}
          {{view view.parentView.inputSort}}
          {{view view.parentView.outputSort}}
          {{view view.parentView.durationSort}}
        {{/view}}
      </tr>
      </thead>
      <tbody>
      {{#each job in controller.content.jobs}}
      <tr>
        {{#if view.hasManyJobs}}<td>{{job.workflow_entity_name}}</td>{{/if}}
        <td>{{job.id}}</td>
        <td>{{job.status}}</td>
        <td>{{job.maps}}</td>
        <td>{{job.reduces}}</td>
        <td>{{job.inputFormatted}}</td>
        <td>{{job.outputFormatted}}</td>
        <td>{{job.duration}}</td>
      </tr>
      {{/each}}
      </tbody>
    </table>


